home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / Universal Headers 2.0.1f / Controls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-22  |  19.0 KB  |  568 lines  |  [TEXT/MMCC]

  1. /*
  2.      File:        Controls.h
  3.  
  4.      Contains:    Control Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __CONTROLS__
  21. #define __CONTROLS__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __QUICKDRAW__
  30. #include <Quickdraw.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33. /*    #include <QuickdrawText.h>                                    */
  34.  
  35. #ifndef __MENUS__
  36. #include <Menus.h>
  37. #endif
  38. /*    #include <Memory.h>                                            */
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. #if PRAGMA_ALIGN_SUPPORTED
  45. #pragma options align=mac68k
  46. #endif
  47.  
  48. #if PRAGMA_IMPORT_SUPPORTED
  49. #pragma import on
  50. #endif
  51.  
  52. #ifndef STRICT_CONTROLS
  53. #define STRICT_CONTROLS 0
  54. #endif
  55.  
  56. enum {
  57.     pushButProc                    = 0,
  58.     checkBoxProc                = 1,
  59.     radioButProc                = 2,
  60.     scrollBarProc                = 16,
  61.     popupMenuProc                = 1008
  62. };
  63.  
  64. enum {
  65.     kControlUsesOwningWindowsFontVariant = 1 << 3                /* Control uses owning windows font to display text*/
  66. };
  67.  
  68. #if OLDROUTINENAMES
  69. enum {
  70.     useWFont                    = 8
  71. };
  72.  
  73. #endif
  74. typedef SInt16 ControlPartCode;
  75.  
  76.  
  77. enum {
  78.     kControlNoPart                = 0,
  79.     kControlLabelPart            = 1,
  80.     kControlMenuPart            = 2,
  81.     kControlTrianglePart        = 4,
  82.     kControlButtonPart            = 10,
  83.     kControlCheckBoxPart        = 11,
  84.     kControlRadioButtonPart        = 11,
  85.     kControlUpButtonPart        = 20,
  86.     kControlDownButtonPart        = 21,
  87.     kControlPageUpPart            = 22,
  88.     kControlPageDownPart        = 23,
  89.     kControlIndicatorPart        = 129,
  90.     kControlDisabledPart        = 254,
  91.     kControlInactivePart        = 255
  92. };
  93.  
  94. #if OLDROUTINENAMES
  95. enum {
  96.     inLabel                        = 1,
  97.     inMenu                        = 2,
  98.     inTriangle                    = 4,
  99.     inButton                    = 10,
  100.     inCheckBox                    = 11,
  101.     inUpButton                    = 20,
  102.     inDownButton                = 21,
  103.     inPageUp                    = 22,
  104.     inPageDown                    = 23,
  105.     inThumb                        = 129
  106. };
  107.  
  108. #endif
  109. enum {
  110.     kControlCheckboxUncheckedValue = 0,
  111.     kControlCheckboxCheckedValue = 1,
  112.     kControlCheckboxMixedValue    = 2
  113. };
  114.  
  115. /*_________________________________________________________________________________________________________*/
  116. /**/
  117. /* • RADIO BUTTON VALUES*/
  118. /**/
  119. /*_________________________________________________________________________________________________________*/
  120. enum {
  121.     kControlRadioButtonUncheckedValue = 0,
  122.     kControlRadioButtonCheckedValue = 1,
  123.     kControlRadioButtonMixedValue = 2
  124. };
  125.  
  126. enum {
  127.     popupFixedWidth                = 1 << 0,
  128.     popupVariableWidth            = 1 << 1,
  129.     popupUseAddResMenu            = 1 << 2,
  130.     popupUseWFont                = 1 << 3
  131. };
  132.  
  133. /**/
  134. /* Menu label styles for the System 7 pop-up menu */
  135. /**/
  136. enum {
  137.     popupTitleBold                = 1 << 8,
  138.     popupTitleItalic            = 1 << 9,
  139.     popupTitleUnderline            = 1 << 10,
  140.     popupTitleOutline            = 1 << 11,
  141.     popupTitleShadow            = 1 << 12,
  142.     popupTitleCondense            = 1 << 13,
  143.     popupTitleExtend            = 1 << 14,
  144.     popupTitleNoStyle            = 1 << 15
  145. };
  146.  
  147. /**/
  148. /* Menu label justifications for the System 7 pop-up menu*/
  149. /**/
  150. enum {
  151.     popupTitleLeftJust            = 0x00000000,
  152.     popupTitleCenterJust        = 0x00000001,
  153.     popupTitleRightJust            = 0x000000FF
  154. };
  155.  
  156. /*_________________________________________________________________________________________________________*/
  157. /**/
  158. /* • CONTROL DRAGGRAYRGN CONSTANTS*/
  159. /**/
  160. enum {
  161.     noConstraint                = kNoConstraint,
  162.     hAxisOnly                    = 1,
  163.     vAxisOnly                    = 2
  164. };
  165.  
  166. /*_________________________________________________________________________________________________________*/
  167. /**/
  168. /* • CONTROL COLOR TABLE PART CODES*/
  169. /**/
  170. enum {
  171.     cFrameColor                    = 0,
  172.     cBodyColor                    = 1,
  173.     cTextColor                    = 2,
  174.     cThumbColor                    = 3
  175. };
  176.  
  177. /*_________________________________________________________________________________________________________*/
  178. /**/
  179. /* • CONTROL TYPE DECLARATIONS*/
  180. /**/
  181. /*_________________________________________________________________________________________________________*/
  182. /**/
  183. /* Define ControlRef and ControlHandle*/
  184. /**/
  185. #if STRICT_CONTROLS
  186. typedef struct OpaqueControlRef *ControlRef;
  187.  
  188. typedef ControlRef ControlHandle;
  189.  
  190. #else
  191. typedef struct ControlRecord ControlRecord, *ControlPtr, **ControlHandle;
  192.  
  193. typedef ControlHandle ControlRef;
  194.  
  195. #endif
  196. typedef pascal void (*ControlActionProcPtr)(ControlRef theControl, ControlPartCode partCode);
  197.  
  198. #if GENERATINGCFM
  199. typedef UniversalProcPtr ControlActionUPP;
  200. #else
  201. typedef ControlActionProcPtr ControlActionUPP;
  202. #endif
  203.  
  204. struct CtlCTab {
  205.     SInt32                            ccSeed;
  206.     SInt16                            ccRider;
  207.     SInt16                            ctSize;
  208.     ColorSpec                        ctTable[4];
  209. };
  210. typedef struct CtlCTab CtlCTab;
  211.  
  212. typedef CtlCTab *CCTabPtr, **CCTabHandle;
  213.  
  214. #if !STRICT_CONTROLS
  215. struct ControlRecord {
  216.     ControlRef                        nextControl;
  217.     WindowRef                        contrlOwner;
  218.     Rect                            contrlRect;
  219.     UInt8                            contrlVis;
  220.     UInt8                            contrlHilite;
  221.     SInt16                            contrlValue;
  222.     SInt16                            contrlMin;
  223.     SInt16                            contrlMax;
  224.     Handle                            contrlDefProc;
  225.     Handle                            contrlData;
  226.     ControlActionUPP                contrlAction;
  227.     SInt32                            contrlRfCon;
  228.     Str255                            contrlTitle;
  229. };
  230. /*_________________________________________________________________________________________________________*/
  231. /**/
  232. /* • AUXILLARY CONTROL RECORD STRUCTURE*/
  233. /**/
  234. /*_________________________________________________________________________________________________________*/
  235. struct AuxCtlRec {
  236.     Handle                            acNext;
  237.     ControlRef                        acOwner;
  238.     CCTabHandle                        acCTable;
  239.     SInt16                            acFlags;
  240.     SInt32                            acReserved;
  241.     SInt32                            acRefCon;
  242. };
  243. typedef struct AuxCtlRec AuxCtlRec;
  244.  
  245. typedef AuxCtlRec *AuxCtlPtr, **AuxCtlHandle;
  246.  
  247. /*_________________________________________________________________________________________________________*/
  248. /**/
  249. /* • POP-UP MENU PRIVATE DATA STRUCTURE*/
  250. /**/
  251. /*_________________________________________________________________________________________________________*/
  252. struct PopupPrivateData {
  253.     MenuHandle                        mHandle;
  254.     SInt16                            mID;
  255. };
  256. typedef struct PopupPrivateData PopupPrivateData;
  257.  
  258. typedef PopupPrivateData *PopupPrivateDataPtr, **PopupPrivateDataHandle;
  259.  
  260. #endif
  261.  
  262. #if GENERATINGCFM
  263. #else
  264. #endif
  265.  
  266. enum {
  267.     uppControlActionProcInfo = kPascalStackBased
  268.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ControlRef)))
  269.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(ControlPartCode)))
  270. };
  271.  
  272. #if GENERATINGCFM
  273. #define NewControlActionProc(userRoutine)        \
  274.         (ControlActionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlActionProcInfo, GetCurrentArchitecture())
  275. #else
  276. #define NewControlActionProc(userRoutine)        \
  277.         ((ControlActionUPP) (userRoutine))
  278. #endif
  279.  
  280. #if GENERATINGCFM
  281. #define CallControlActionProc(userRoutine, theControl, partCode)        \
  282.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppControlActionProcInfo, (theControl), (partCode))
  283. #else
  284. #define CallControlActionProc(userRoutine, theControl, partCode)        \
  285.         (*(userRoutine))((theControl), (partCode))
  286. #endif
  287.  
  288. extern pascal ControlRef NewControl(WindowRef theWindow, const Rect *boundsRect, ConstStr255Param title, Boolean visible, SInt16 value, SInt16 min, SInt16 max, SInt16 procID, SInt32 refCon)
  289.  ONEWORDINLINE(0xA954);
  290. extern pascal ControlRef GetNewControl(SInt16 controlID, WindowRef owner)
  291.  ONEWORDINLINE(0xA9BE);
  292. extern pascal void DisposeControl(ControlRef theControl)
  293.  ONEWORDINLINE(0xA955);
  294. extern pascal void KillControls(WindowRef theWindow)
  295.  ONEWORDINLINE(0xA956);
  296. /*_________________________________________________________________________________________________________*/
  297. /*    */
  298. /* • CONTROL SHOWING/HIDING API'S*/
  299. /**/
  300. /*_________________________________________________________________________________________________________*/
  301. extern pascal void ShowControl(ControlRef theControl)
  302.  ONEWORDINLINE(0xA957);
  303. extern pascal void HideControl(ControlRef theControl)
  304.  ONEWORDINLINE(0xA958);
  305. /*_________________________________________________________________________________________________________*/
  306. /*    */
  307. /* • CONTROL DRAWING API'S*/
  308. /**/
  309. /*_________________________________________________________________________________________________________*/
  310. extern pascal void DrawControls(WindowRef theWindow)
  311.  ONEWORDINLINE(0xA969);
  312. extern pascal void Draw1Control(ControlRef theControl)
  313.  ONEWORDINLINE(0xA96D);
  314. extern pascal void UpdateControls(WindowRef theWindow, RgnHandle updateRgn)
  315.  ONEWORDINLINE(0xA953);
  316. extern pascal void HiliteControl(ControlRef theControl, ControlPartCode hiliteState)
  317.  ONEWORDINLINE(0xA95D);
  318. extern pascal ControlPartCode TrackControl(ControlRef theControl, Point thePoint, ControlActionUPP actionProc)
  319.  ONEWORDINLINE(0xA968);
  320. extern pascal void DragControl(ControlRef theControl, Point startPt, const Rect *limitRect, const Rect *slopRect, DragConstraint axis)
  321.  ONEWORDINLINE(0xA967);
  322. extern pascal ControlPartCode TestControl(ControlRef theControl, Point thePt)
  323.  ONEWORDINLINE(0xA966);
  324. extern pascal ControlPartCode FindControl(Point thePoint, WindowRef theWindow, ControlRef *theControl)
  325.  ONEWORDINLINE(0xA96C);
  326. /*_________________________________________________________________________________________________________*/
  327. /*    */
  328. /* • CONTROL MOVING/SIZING API'S*/
  329. /**/
  330. /*_________________________________________________________________________________________________________*/
  331. extern pascal void MoveControl(ControlRef theControl, SInt16 h, SInt16 v)
  332.  ONEWORDINLINE(0xA959);
  333. extern pascal void SizeControl(ControlRef theControl, SInt16 w, SInt16 h)
  334.  ONEWORDINLINE(0xA95C);
  335. /*_________________________________________________________________________________________________________*/
  336. /*    */
  337. /* • CONTROL TITLE API'S*/
  338. /**/
  339. /*_________________________________________________________________________________________________________*/
  340. extern pascal void SetControlTitle(ControlRef theControl, ConstStr255Param title)
  341.  ONEWORDINLINE(0xA95F);
  342. extern pascal void GetControlTitle(ControlRef theControl, Str255 title)
  343.  ONEWORDINLINE(0xA95E);
  344. /*_________________________________________________________________________________________________________*/
  345. /*    */
  346. /* • CONTROL VALUE, MIMIMUM, AND MAXIMUM API'S*/
  347. /**/
  348. /*_________________________________________________________________________________________________________*/
  349. extern pascal SInt16 GetControlValue(ControlRef theControl)
  350.  ONEWORDINLINE(0xA960);
  351. extern pascal void SetControlValue(ControlRef theControl, SInt16 newValue)
  352.  ONEWORDINLINE(0xA963);
  353. extern pascal SInt16 GetControlMinimum(ControlRef theControl)
  354.  ONEWORDINLINE(0xA961);
  355. extern pascal void SetControlMinimum(ControlRef theControl, SInt16 newMinimum)
  356.  ONEWORDINLINE(0xA964);
  357. extern pascal SInt16 GetControlMaximum(ControlRef theControl)
  358.  ONEWORDINLINE(0xA962);
  359. extern pascal void SetControlMaximum(ControlRef theControl, SInt16 newMaximum)
  360.  ONEWORDINLINE(0xA965);
  361. /*_________________________________________________________________________________________________________*/
  362. /*    */
  363. /* • CONTROL VARIANT AND WINDOW INFORMATION API'S*/
  364. /**/
  365. /*_________________________________________________________________________________________________________*/
  366. extern pascal SInt16 GetControlVariant(ControlRef theControl)
  367.  ONEWORDINLINE(0xA809);
  368. extern pascal void SetControlAction(ControlRef theControl, ControlActionUPP actionProc)
  369.  ONEWORDINLINE(0xA96B);
  370. extern pascal ControlActionUPP GetControlAction(ControlRef theControl)
  371.  ONEWORDINLINE(0xA96A);
  372. /*_________________________________________________________________________________________________________*/
  373. /*    */
  374. /* • CONTROL ACCESSOR API'S*/
  375. /**/
  376. /*_________________________________________________________________________________________________________*/
  377. extern pascal void SetControlReference(ControlRef theControl, SInt32 data)
  378.  ONEWORDINLINE(0xA95B);
  379. extern pascal SInt32 GetControlReference(ControlRef theControl)
  380.  ONEWORDINLINE(0xA95A);
  381. /*_________________________________________________________________________________________________________*/
  382. /*    */
  383. /* • PREPARE FOR THE COPLAND MACINTOSH OS NOW*/
  384. /**/
  385. /*     The window control list is moving to the Control Manager.  In addition, to prepare for Copland, you*/
  386. /*     want to try to begin compiling with STRICT_CONTROLS and STRICT_WINDOWS turned on.  This makes the*/
  387. /*     ControlRecord and WindowRecord opaque and you will be unable to access the fields directly.  If you*/
  388. /*     need information from one of these fields, use one of the provided accessor functions.  For now,*/
  389. /*     the new accessor functions are provided as macros, but in Copland they will become true API entry*/
  390. /*      points.*/
  391. /**/
  392. /*     So what does this all mean?  Replace all references to the window control list in the WindowRecord*/
  393. /*     with the macro below.  Then in the future when Copland interfaces are available, no source changes*/
  394. /*     will be required and the macro will automatically replaced with a call to the real API.*/
  395. /**/
  396. /*     Please direct all questions regarding usuage to the TOOLBOX AppleLink address.*/
  397. /**/
  398. /*     <<<< See Windows.h for more information >>>>>*/
  399. /**/
  400. /*_________________________________________________________________________________________________________*/
  401. #define GetControlOwningWindowControlList(theWindowRef) ( *(ControlRef *) (((UInt8 *) theWindowRef) + sizeof(GrafPort) + 0x20))
  402. #if !STRICT_CONTROLS
  403. extern pascal Boolean GetAuxiliaryControlRecord(ControlRef theControl, AuxCtlHandle *acHndl)
  404.  ONEWORDINLINE(0xAA44);
  405. #endif
  406. extern pascal void SetControlColor(ControlRef theControl, CCTabHandle newColorTable)
  407.  ONEWORDINLINE(0xAA43);
  408. typedef SInt16 ControlDefProcMessage;
  409.  
  410.  
  411. enum {
  412.     drawCntl                    = 0,
  413.     testCntl                    = 1,
  414.     calcCRgns                    = 2,
  415.     initCntl                    = 3,
  416.     dispCntl                    = 4,
  417.     posCntl                        = 5,
  418.     thumbCntl                    = 6,
  419.     dragCntl                    = 7,
  420.     autoTrack                    = 8,
  421.     calcCntlRgn                    = 10,
  422.     calcThumbRgn                = 11,
  423.     drawThumbOutline            = 12
  424. };
  425.  
  426. /*_________________________________________________________________________________________________________*/
  427. /*    */
  428. /* • MAIN ENTRY POINT FOR 'CDEF'*/
  429. /**/
  430. typedef pascal SInt32 (*ControlDefProcPtr)(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param);
  431.  
  432. #if GENERATINGCFM
  433. typedef UniversalProcPtr ControlDefUPP;
  434. #else
  435. typedef ControlDefProcPtr ControlDefUPP;
  436. #endif
  437.  
  438. enum {
  439.     uppControlDefProcInfo = kPascalStackBased
  440.          | RESULT_SIZE(SIZE_CODE(sizeof(SInt32)))
  441.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SInt16)))
  442.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(ControlRef)))
  443.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(ControlDefProcMessage)))
  444.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(SInt32)))
  445. };
  446.  
  447. #if GENERATINGCFM
  448. #define NewControlDefProc(userRoutine)        \
  449.         (ControlDefUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlDefProcInfo, GetCurrentArchitecture())
  450. #else
  451. #define NewControlDefProc(userRoutine)        \
  452.         ((ControlDefUPP) (userRoutine))
  453. #endif
  454.  
  455. #if GENERATINGCFM
  456. #define CallControlDefProc(userRoutine, varCode, theControl, message, param)        \
  457.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppControlDefProcInfo, (varCode), (theControl), (message), (param))
  458. #else
  459. #define CallControlDefProc(userRoutine, varCode, theControl, message, param)        \
  460.         (*(userRoutine))((varCode), (theControl), (message), (param))
  461. #endif
  462.  
  463. /*_________________________________________________________________________________________________________*/
  464. /*    */
  465. /* • CONSTANTS FOR DRAWCNTL MESSAGE PASSED IN PARAM*/
  466. /**/
  467. /*_________________________________________________________________________________________________________*/
  468. enum {
  469.     kDrawControlEntireControl    = 0,
  470.     kDrawControlIndicatorOnly    = 129
  471. };
  472.  
  473. /*_________________________________________________________________________________________________________*/
  474. /*    */
  475. /* • CONSTANTS FOR DRAGCNTL MESSAGE PASSED IN PARAM*/
  476. /**/
  477. /*_________________________________________________________________________________________________________*/
  478. enum {
  479.     kDragControlEntireControl    = 0
  480. };
  481.  
  482. /*_________________________________________________________________________________________________________*/
  483. /*    */
  484. /* • DRAG CONSTRAINT STRUCTURE PASSED IN PARAM FOR THUMBCNTL MESSAGE (IM I-332)*/
  485. /**/
  486. /*_________________________________________________________________________________________________________*/
  487. struct IndicatorDragConstraint {
  488.     Rect                            limitRect;
  489.     Rect                            slopRect;
  490.     DragConstraint                    axis;
  491. };
  492. typedef struct IndicatorDragConstraint IndicatorDragConstraint;
  493.  
  494. typedef IndicatorDragConstraint *IndicatorDragConstraintPtr, **IndicatorDragConstraintHandle;
  495.  
  496. /*_________________________________________________________________________________________________________*/
  497. /**/
  498. /* • OLD ROUTINE NAMES*/
  499. /**/
  500. /*   These are provided for compatiblity with older source bases.  It is recommended to not use them since*/
  501. /*     they may removed from this interface file at any time.*/
  502. /**/
  503. /*_________________________________________________________________________________________________________*/
  504. #if OLDROUTINENAMES
  505.  
  506. enum {
  507.     kNoHiliteControlPart        = 0,
  508.     kInLabelControlPart            = 1,
  509.     kInMenuControlPart            = 2,
  510.     kInTriangleControlPart        = 4,
  511.     kInButtonControlPart        = 10,
  512.     kInCheckBoxControlPart        = 11,
  513.     kInUpButtonControlPart        = 20,
  514.     kInDownButtonControlPart    = 21,
  515.     kInPageUpControlPart        = 22,
  516.     kInPageDownControlPart        = 23,
  517.     kInIndicatorControlPart        = 129,
  518.     kReservedControlPart        = 254,
  519.     kControlInactiveControlPart    = 255
  520. };
  521.  
  522. #endif
  523. #if CGLUESUPPORTED
  524. extern void dragcontrol(ControlRef theControl, Point *startPt, const Rect *limitRect, const Rect *slopRect, short axis);
  525. extern ControlRef newcontrol(WindowRef theWindow, const Rect *boundsRect, const char *title, Boolean visible, short value, short min, short max, short procID, long refCon);
  526. extern short findcontrol(Point *thePoint, WindowRef theWindow, ControlRef *theControl);
  527. extern void getcontroltitle(ControlRef theControl, char *title);
  528. extern void setcontroltitle(ControlRef theControl, const char *title);
  529. extern short trackcontrol(ControlRef theControl, Point *thePoint, ControlActionUPP actionProc);
  530. extern short testcontrol(ControlRef theControl, Point *thePt);
  531. #endif
  532. #if OLDROUTINENAMES
  533. #define SetCTitle(theControl, title) SetControlTitle(theControl, title)
  534. #define GetCTitle(theControl, title) GetControlTitle(theControl, title)
  535. #define UpdtControl(theWindow, updateRgn) UpdateControls(theWindow, updateRgn)
  536. #define SetCtlValue(theControl, theValue) SetControlValue(theControl, theValue)
  537. #define GetCtlValue(theControl) GetControlValue(theControl)
  538. #define SetCtlMin(theControl, minValue) SetControlMinimum(theControl, minValue)
  539. #define GetCtlMin(theControl) GetControlMinimum(theControl)
  540. #define SetCtlMax(theControl, maxValue) SetControlMaximum(theControl, maxValue)
  541. #define GetCtlMax(theControl) GetControlMaximum(theControl)
  542. #define GetAuxCtl(theControl, acHndl) GetAuxiliaryControlRecord(theControl, acHndl)
  543. #define SetCRefCon(theControl, data) SetControlReference(theControl, data)
  544. #define GetCRefCon(theControl) GetControlReference(theControl)
  545. #define SetCtlAction(theControl, actionProc) SetControlAction(theControl, actionProc)
  546. #define GetCtlAction(theControl) GetControlAction(theControl)
  547. #define SetCtlColor(theControl, newColorTable) SetControlColor(theControl, newColorTable)
  548. #define GetCVariant(theControl) GetControlVariant(theControl)
  549. #if CGLUESUPPORTED
  550. #define getctitle(theControl, title) getcontroltitle(theControl, title)
  551. #define setctitle(theControl, title) setcontroltitle(theControl, title)
  552. #endif
  553. #endif
  554.  
  555. #if PRAGMA_IMPORT_SUPPORTED
  556. #pragma import off
  557. #endif
  558.  
  559. #if PRAGMA_ALIGN_SUPPORTED
  560. #pragma options align=reset
  561. #endif
  562.  
  563. #ifdef __cplusplus
  564. }
  565. #endif
  566.  
  567. #endif /* __CONTROLS__ */
  568.